package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

@TableName("t_product")
public class ProductBean {
    @TableId(value = "pk_productId", type = IdType.AUTO)
    private Integer id;
    @TableField("p_name")
    private String name;
    @TableField("p_imgPath")
    private String imgPath;
    @TableField("p_price")
    private Integer price;
    @TableField("p_createAddr")
    private String createAddr;
    @TableField("p_createDate")
    private LocalDate createDate;
    @TableField(exist = false)
    private Integer salesNum;

    public ProductBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getCreateAddr() {
        return createAddr;
    }

    public void setCreateAddr(String createAddr) {
        this.createAddr = createAddr;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public Integer getSalesNum() {
        return salesNum;
    }

    public void setSalesNum(Integer salesNum) {
        this.salesNum = salesNum;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", imgPath='" + imgPath + '\'' +
                ", price=" + price +
                ", createAddr='" + createAddr + '\'' +
                ", createDate=" + createDate +
                ", salesNum=" + salesNum +
                '}' + "\n";
    }
}
